#if !defined(__BROWSEFORFOLDERDIALOG_H__)
#define __BROWSEFORFOLDERDIALOG_H__

#include <windows.h>
#include <commctrl.h>

#include "Dialog.h"

class BrowseForFolderDialog: public Dialog {
public:
    BrowseForFolderDialog(HINSTANCE hInstance, const TCHAR *caption) throw();
    virtual ~BrowseForFolderDialog();

    const TCHAR *selectedFile() const throw();
    const TCHAR *selectedPath() const throw();
protected:
    virtual bool close(CloseCommand cc) throw();
    virtual void controlNotification(HWND hWnd, WPARAM notification) throw();
    virtual void menuNotification(unsigned int itemId) throw();
private:
    void addFolders(const TCHAR *root, HTREEITEM parent) throw();

    HWND m_hFolders;
    HWND m_hFileName;
    HIMAGELIST m_hImages;

    TCHAR m_file[MAX_PATH];
    TCHAR m_path[MAX_PATH];
};

#endif
